From d4ddfdc265c33d5876e56f6faf243df48470fa13 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 12 Nov 2020 14:54:39 +0000 Subject: [PATCH] a11y: Set the role on GtkSearchBar The search bar widget has a "SEARCH" landmark role, which is described as: A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility. --- gtk/gtksearchbar.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c index d7590bb707..c1a23bf304 100644 --- a/gtk/gtksearchbar.c +++ b/gtk/gtksearchbar.c @@ -82,6 +82,10 @@ * ## Creating a search bar * * [A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/master/examples/search-bar.c) + * + * # Accessibility + * + * GtkSearchBar uses the %GTK_ACCESSIBLE_ROLE_SEARCH role. */ typedef struct _GtkSearchBarClass GtkSearchBarClass; @@ -336,6 +340,7 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass) gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); gtk_widget_class_set_css_name (widget_class, I_("searchbar")); + gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_SEARCH); } static void -- 2.30.2